package gui;

import SQL.Conexion;
import controlador.*;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.net.URL;
import java.sql.*;
import modelo.*;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.FileInputStream;
import javax.swing.event.*;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Daniel
 */
public class ventanaPrincipal extends javax.swing.JFrame {

    Sesion c = new Sesion();
    ControladorLibro l = new ControladorLibro();
    ControladorUsuario u = new ControladorUsuario();
    
    private BufferedImage image = null;  
    FileInputStream fip =null;
    private BufferedImage imageMod=null;
    FileInputStream fipMod=null;
    private java.sql.Date fechaV= null;
    /** Creates new form ventanaPrincipal */
    
    //metodo para los combobox
    public ventanaPrincipal() {
        initComponents();
        this.camposLimpios();
        this.listarLibros();
        this.listarUsuarios();
        this.PanelLibro.setVisible(false);
        this.PanelUsuario.setVisible(true);
        this.PanelVenta.setVisible(false);
    }
    private void camposLimpios()
    {
        this.txtLibroNombreI.setText("");
        this.txtAnoI.setText("");
        this.txtLibroPaginaI.setText("");
        this.txtLibroPrecioI.setText("");
        this.txtLibroAutorI.setText("");
        this.txtLibroEditorialI.setText("");
        this.cmbLibroAutorI.removeAllItems();
        this.cmbLibroAutorM.removeAllItems();
        this.cmbLibroEditorialI.removeAllItems();
        this.cmbLibroEditorialM.removeAllItems();
        this.PanelImagen.removeAll();
        //test
        PanelImagen.setVisible(true);
                PanelImagen.repaint();
        ArrayList<String> a = c.listaAutores();
        int contador = a.size();
        for(int i=0; i<contador; i++)
        {
            this.cmbLibroAutorI.addItem(a.get(i));
            this.cmbLibroAutorM.addItem(a.get(i));
        }
        ArrayList<String> e = c.listaEditoriales();
        int contador2 = e.size();
        for(int i=0; i<contador2; i++)
        {
            this.cmbLibroEditorialI.addItem(e.get(i));
            this.cmbLibroEditorialM.addItem(e.get(i));
        }  
    }
    private void camposLimpiosM()
    {
        this.txtLibroNombreM.setText("");
        this.txtAnoM.setText("");
        this.txtLibroPaginaM.setText("");
        this.txtLibroPrecioM.setText("");
        this.txtLibroAutorM.setText("");
        this.txtLibroEditorialM.setText("");
        this.cmbLibroAutorI.removeAllItems();
        this.cmbLibroAutorM.removeAllItems();
        this.cmbLibroEditorialI.removeAllItems();
        this.cmbLibroEditorialM.removeAllItems();
        this.PanelImagen.removeAll();
        this.panelImagenM.removeAll();
        //test
        PanelImagen.setVisible(true);
        PanelImagen.repaint();
        panelImagenM.setVisible(true);
        panelImagenM.repaint();
        ArrayList<String> a = c.listaAutores();
        int contador = a.size();
        for(int i=0; i<contador; i++)
        {
            this.cmbLibroAutorI.addItem(a.get(i));
            this.cmbLibroAutorM.addItem(a.get(i));
        }
        ArrayList<String> e = c.listaEditoriales();
        int contador2 = e.size();
        for(int i=0; i<contador2; i++)
        {
            this.cmbLibroEditorialI.addItem(e.get(i));
            this.cmbLibroEditorialM.addItem(e.get(i));
        }  
    }
     void cargar_imagen_en_buffer(URL _url)
    {
        //se llena el buffer con la imagen        
            try 
            {
                image = ImageIO.read(_url);
                
            } catch (Exception ex) {
                System.out.println("problema --"+ex);
            }
    }
    public BufferedImage Obtener_imagen_de_Buffer()
    {       
        return image;
    }
    public void listarLibros()
    {
        ArrayList<Libro> lista = l.listarLibros();
        if(lista.isEmpty())
        {
            JOptionPane.showMessageDialog(this, "Búsqueda sin resultados");
        }
        else
        {
            DefaultTableModel modelo = (DefaultTableModel)this.TablaLibroListar.getModel();
            modelo.setNumRows(0);
            for(Libro z:lista)
            {
                Object[] arr ={z.getID_Libro(),z.getNOMBRE_ARTICULO(),z.getAUTOR(),z.getNUM_PAGINAS(),z.getAGNO(),z.getEDITORIAL(),z.getMONTO_ARTICULO(),};
                modelo.addRow(arr);
            }
        }       
    }
    public void listarUsuarios()
    {
        ArrayList<Usuario> lista = u.ListarUsuarios();
        if(lista.isEmpty())
        {
            JOptionPane.showMessageDialog(this, "Búsqueda sin resultados");
        }
        else
        {
            DefaultTableModel modelo = (DefaultTableModel)this.TablaUserListar.getModel();
            modelo.setNumRows(0);
            for(Usuario z:lista)
            {
                Object[] arr ={z.getId_usuario(),z.getNombre_usuario(),z.getFecha_nac(),z.getRut(),z.getSexo(),z.getNombre(),z.getApPaterno(),z.getApMaterno(),z.getEmail(),z.getTelefono()};
                modelo.addRow(arr);
            }
        }       
    }
    private void usuarioCamposLimpios()
    {
        this.txtUsuarioUser.setText("");
        this.txtUsuarioApMaterno.setText("");
        this.txtUsuarioApPaterno.setText("");
        this.txtUsuarioEmail.setText("");
        this.txtUsuarioNombre.setText("");
        this.txtUsuarioPassword.setText("");
        this.txtUsuarioPasswordC.setText("");
        this.txtUsuarioRut.setText("");
        this.txtUsuarioTelefono.setText("");
        this.rbUsuarioMasculino.setSelected(true);
        
    }
    private void usuarioCamposLimpiosM()
    {
        this.txtUsuarioUserM.setText("");
        this.txtUsuarioApMaternoM.setText("");
        this.txtUsuarioApPaternoM.setText("");
        this.txtUsuarioEmailM.setText("");
        this.txtUsuarioNombreM.setText("");
        this.txtUsuarioPasswordM.setText("");
        this.txtUsuarioPasswordCM.setText("");
        this.txtUsuarioRutM.setText("");
        this.txtUsuarioTelefonoM.setText("");
        this.rbUsuarioMasculinoM.setSelected(true);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("jdbc:oracle:thin:@localhost:1521:XEPU").createEntityManager();
        autorQuery = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery("SELECT a FROM Autor a");
        autorList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : autorQuery.getResultList();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        PanelLibro = new javax.swing.JTabbedPane();
        LibroIngreso = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtLibroNombreI = new javax.swing.JTextField();
        txtLibroAutorI = new javax.swing.JTextField();
        txtLibroEditorialI = new javax.swing.JTextField();
        txtLibroPrecioI = new javax.swing.JTextField();
        this.txtLibroPrecioI.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        txtLibroPaginaI = new javax.swing.JTextField();
        this.txtLibroPaginaI.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        chkNuevoEditorial = new javax.swing.JCheckBox();
        chkNuevoAutor = new javax.swing.JCheckBox();
        cmbLibroAutorI = new javax.swing.JComboBox();
        cmbLibroEditorialI = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        btnSubirImagen = new javax.swing.JButton();
        PanelImagen = new javax.swing.JPanel();
        txtAnoI = new javax.swing.JTextField();
        this.txtAnoI.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        btnLibroAgregar = new javax.swing.JButton();
        LibroModificar = new javax.swing.JPanel();
        txbIdBuscar = new javax.swing.JTextField();
        this.txbIdBuscar.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        btnBuscar = new javax.swing.JButton();
        jLabel13 = new javax.swing.JLabel();
        btnModificar = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        txtLibroNombreM = new javax.swing.JTextField();
        txtLibroAutorM = new javax.swing.JTextField();
        txtLibroEditorialM = new javax.swing.JTextField();
        txtLibroPrecioM = new javax.swing.JTextField();
        this.txtLibroPrecioM.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        txtLibroPaginaM = new javax.swing.JTextField();
        this.txtLibroPaginaM.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        chkNuevoEditorialM = new javax.swing.JCheckBox();
        chkNuevoAutorM = new javax.swing.JCheckBox();
        cmbLibroAutorM = new javax.swing.JComboBox();
        cmbLibroEditorialM = new javax.swing.JComboBox();
        jPanel6 = new javax.swing.JPanel();
        panelImagenM = new javax.swing.JPanel();
        btnModificarImagen = new javax.swing.JButton();
        txtAnoM = new javax.swing.JTextField();
        this.txtAnoM.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        LibroListar = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        TablaLibroListar = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        txtIdioma = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        btnAgregarIdioma = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        txtGenero = new javax.swing.JTextField();
        jLabel44 = new javax.swing.JLabel();
        btnAgregarGenero = new javax.swing.JButton();
        PanelUsuario = new javax.swing.JTabbedPane();
        UsuarioIngreso = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        txtUsuarioUser = new javax.swing.JTextField();
        txtUsuarioPassword = new javax.swing.JTextField();
        txtUsuarioPasswordC = new javax.swing.JTextField();
        txtUsuarioRut = new javax.swing.JTextField();
        txtUsuarioNombre = new javax.swing.JTextField();
        txtUsuarioApPaterno = new javax.swing.JTextField();
        txtUsuarioApMaterno = new javax.swing.JTextField();
        txtUsuarioEmail = new javax.swing.JTextField();
        txtUsuarioTelefono = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        rbUsuarioMasculino = new javax.swing.JRadioButton();
        rbUsuarioFemenino = new javax.swing.JRadioButton();
        DateChooserFecha = new com.toedter.calendar.JDateChooser();
        btnIngresar = new javax.swing.JButton();
        UsuarioModificar = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        txtUsuarioUserM = new javax.swing.JTextField();
        txtUsuarioPasswordM = new javax.swing.JTextField();
        txtUsuarioPasswordCM = new javax.swing.JTextField();
        txtUsuarioRutM = new javax.swing.JTextField();
        txtUsuarioNombreM = new javax.swing.JTextField();
        txtUsuarioApPaternoM = new javax.swing.JTextField();
        txtUsuarioApMaternoM = new javax.swing.JTextField();
        txtUsuarioEmailM = new javax.swing.JTextField();
        txtUsuarioTelefonoM = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        rbUsuarioMasculinoM = new javax.swing.JRadioButton();
        rbUsuarioFemeninoM = new javax.swing.JRadioButton();
        DateChooserFechaM = new com.toedter.calendar.JDateChooser();
        btnModificarUser = new javax.swing.JButton();
        btnEliminarUser = new javax.swing.JButton();
        txtUsuarioBuscarId = new javax.swing.JTextField();
        this.txbIdBuscar.addKeyListener(new KeyAdapter()
            {
                public void keyTyped(KeyEvent e)
                {
                    char caracter = e.getKeyChar();

                    // Verificar si la tecla pulsada no es un digito
                    if(((caracter < '0') ||
                        (caracter > '9')) &&
                    (caracter != KeyEvent.VK_BACK_SPACE &&
                        caracter != KeyEvent.VK_BACK_SPACE))
                {
                    e.consume();  // ignorar el evento de teclado
                }
            }
        });
        jLabel36 = new javax.swing.JLabel();
        btnBuscarUser = new javax.swing.JButton();
        UsuarioListar = new javax.swing.JPanel();
        btnRefreshUser = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        TablaUserListar = new javax.swing.JTable();
        PanelVenta = new javax.swing.JTabbedPane();
        jPanel8 = new javax.swing.JPanel();
        jLabel37 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jCheckBox1 = new javax.swing.JCheckBox();
        jTextField1 = new javax.swing.JTextField();
        jComboBox2 = new javax.swing.JComboBox();
        jLabel39 = new javax.swing.JLabel();
        jComboBox3 = new javax.swing.JComboBox();
        jLabel38 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        lblPrecio = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        DateChooserVenta = new com.toedter.calendar.JDateChooser();
        lblHoraVenta = new javax.swing.JLabel();
        btnSetVenta = new javax.swing.JButton();
        btnIngresarVenta = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        TablaVentaListar = new javax.swing.JTable();
        btnRefreshVenta = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setLocationByPlatform(true);
        setResizable(false);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Libro"));

        jLabel1.setText("Nombre");

        jLabel2.setText("Autor");

        jLabel3.setText("Editorial");

        jLabel4.setText("Precio");

        jLabel5.setText("Año");

        jLabel6.setText("Páginas");

        txtLibroAutorI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtLibroAutorIActionPerformed(evt);
            }
        });

        txtLibroPrecioI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtLibroPrecioIActionPerformed(evt);
            }
        });

        chkNuevoEditorial.setText("Nueva Editorial");

        chkNuevoAutor.setText("Nuevo Autor");

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagen"));

        btnSubirImagen.setText("Subir Imágen");
        btnSubirImagen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSubirImagenActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout PanelImagenLayout = new javax.swing.GroupLayout(PanelImagen);
        PanelImagen.setLayout(PanelImagenLayout);
        PanelImagenLayout.setHorizontalGroup(
            PanelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 234, Short.MAX_VALUE)
        );
        PanelImagenLayout.setVerticalGroup(
            PanelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 281, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(111, 111, 111)
                        .addComponent(btnSubirImagen))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(PanelImagen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(107, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(PanelImagen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(btnSubirImagen)
                .addGap(19, 19, 19))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(jLabel4)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(chkNuevoEditorial)
                    .addComponent(chkNuevoAutor))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtLibroNombreI, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)
                        .addComponent(txtLibroAutorI)
                        .addComponent(txtLibroEditorialI)
                        .addComponent(txtLibroPrecioI)
                        .addComponent(cmbLibroEditorialI, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cmbLibroAutorI, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtLibroPaginaI))
                    .addComponent(txtAnoI, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtLibroNombreI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(cmbLibroAutorI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(7, 7, 7)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(chkNuevoAutor)
                            .addComponent(txtLibroAutorI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(cmbLibroEditorialI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkNuevoEditorial)
                            .addComponent(txtLibroEditorialI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txtLibroPrecioI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtLibroPaginaI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(txtAnoI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        btnLibroAgregar.setText("Agregar");
        btnLibroAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLibroAgregarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout LibroIngresoLayout = new javax.swing.GroupLayout(LibroIngreso);
        LibroIngreso.setLayout(LibroIngresoLayout);
        LibroIngresoLayout.setHorizontalGroup(
            LibroIngresoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroIngresoLayout.createSequentialGroup()
                .addGroup(LibroIngresoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LibroIngresoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(LibroIngresoLayout.createSequentialGroup()
                        .addGap(290, 290, 290)
                        .addComponent(btnLibroAgregar)))
                .addContainerGap())
        );
        LibroIngresoLayout.setVerticalGroup(
            LibroIngresoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroIngresoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLibroAgregar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        PanelLibro.addTab("Ingreso", LibroIngreso);

        btnBuscar.setText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        jLabel13.setText("ID");

        btnModificar.setText("Modificar");
        btnModificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnModificarActionPerformed(evt);
            }
        });

        btnEliminar.setText("Eliminar");
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Libro"));

        jLabel7.setText("Nombre");

        jLabel8.setText("Autor");

        jLabel9.setText("Editorial");

        jLabel10.setText("Precio");

        jLabel11.setText("Año");

        jLabel12.setText("Páginas");

        txtLibroPrecioM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtLibroPrecioMActionPerformed(evt);
            }
        });

        chkNuevoEditorialM.setText("Nueva Editorial");

        chkNuevoAutorM.setText("Nuevo Autor");

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagen"));

        panelImagenM.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout panelImagenMLayout = new javax.swing.GroupLayout(panelImagenM);
        panelImagenM.setLayout(panelImagenMLayout);
        panelImagenMLayout.setHorizontalGroup(
            panelImagenMLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 170, Short.MAX_VALUE)
        );
        panelImagenMLayout.setVerticalGroup(
            panelImagenMLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 197, Short.MAX_VALUE)
        );

        btnModificarImagen.setText("Modificar Imagen");
        btnModificarImagen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnModificarImagenActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(140, Short.MAX_VALUE)
                .addComponent(panelImagenM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(76, 76, 76))
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(163, 163, 163)
                .addComponent(btnModificarImagen)
                .addContainerGap(110, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(panelImagenM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
                .addComponent(btnModificarImagen)
                .addGap(29, 29, 29))
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel11)
                    .addComponent(jLabel12)
                    .addComponent(jLabel10)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(jLabel9)
                    .addComponent(chkNuevoEditorialM)
                    .addComponent(chkNuevoAutorM))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtLibroNombreM, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)
                        .addComponent(txtLibroAutorM)
                        .addComponent(txtLibroEditorialM)
                        .addComponent(txtLibroPrecioM)
                        .addComponent(cmbLibroEditorialM, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(cmbLibroAutorM, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtLibroPaginaM))
                    .addComponent(txtAnoM, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtLibroNombreM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(cmbLibroAutorM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(7, 7, 7)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(chkNuevoAutorM)
                            .addComponent(txtLibroAutorM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(cmbLibroEditorialM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkNuevoEditorialM)
                            .addComponent(txtLibroEditorialM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(txtLibroPrecioM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtLibroPaginaM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11)
                            .addComponent(txtAnoM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout LibroModificarLayout = new javax.swing.GroupLayout(LibroModificar);
        LibroModificar.setLayout(LibroModificarLayout);
        LibroModificarLayout.setHorizontalGroup(
            LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroModificarLayout.createSequentialGroup()
                .addGroup(LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LibroModificarLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel13)
                        .addGap(18, 18, 18)
                        .addComponent(txbIdBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnBuscar))
                    .addGroup(LibroModificarLayout.createSequentialGroup()
                        .addGap(220, 220, 220)
                        .addComponent(btnModificar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnEliminar)))
                .addContainerGap(354, Short.MAX_VALUE))
            .addGroup(LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(LibroModificarLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        LibroModificarLayout.setVerticalGroup(
            LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroModificarLayout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addGroup(LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(txbIdBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 403, Short.MAX_VALUE)
                .addGroup(LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnModificar)
                    .addComponent(btnEliminar))
                .addGap(20, 20, 20))
            .addGroup(LibroModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(LibroModificarLayout.createSequentialGroup()
                    .addGap(42, 42, 42)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(52, Short.MAX_VALUE)))
        );

        PanelLibro.addTab("Modificar", LibroModificar);

        TablaLibroListar.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Id", "Titulo", "Autor", "Páginas", "Año", "Editorial", "Precio"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.String.class, java.lang.Double.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        TablaLibroListar.setDragEnabled(true);
        jScrollPane1.setViewportView(TablaLibroListar);

        jButton1.setText("Refresh");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout LibroListarLayout = new javax.swing.GroupLayout(LibroListar);
        LibroListar.setLayout(LibroListarLayout);
        LibroListarLayout.setHorizontalGroup(
            LibroListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroListarLayout.createSequentialGroup()
                .addGroup(LibroListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LibroListarLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE))
                    .addGroup(LibroListarLayout.createSequentialGroup()
                        .addGap(295, 295, 295)
                        .addComponent(jButton1)))
                .addContainerGap())
        );
        LibroListarLayout.setVerticalGroup(
            LibroListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LibroListarLayout.createSequentialGroup()
                .addGap(14, 14, 14)
                .addComponent(jButton1)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(177, Short.MAX_VALUE))
        );

        PanelLibro.addTab("Listar", LibroListar);

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Idioma"));

        jLabel43.setText("Idioma");

        btnAgregarIdioma.setText("Agregar Idioma");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(jLabel43)
                        .addGap(27, 27, 27)
                        .addComponent(txtIdioma, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGap(96, 96, 96)
                        .addComponent(btnAgregarIdioma)))
                .addContainerGap(88, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(89, 89, 89)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43)
                    .addComponent(txtIdioma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 133, Short.MAX_VALUE)
                .addComponent(btnAgregarIdioma)
                .addGap(70, 70, 70))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Género"));

        jLabel44.setText("Género");

        btnAgregarGenero.setText("Agregar Género");

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnAgregarGenero)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel44)
                        .addGap(31, 31, 31)
                        .addComponent(txtGenero, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(93, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(80, 80, 80)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(txtGenero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                .addComponent(btnAgregarGenero)
                .addGap(57, 57, 57))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(74, 74, 74)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(46, Short.MAX_VALUE))
        );

        PanelLibro.addTab("Idioma/Género", jPanel9);

        PanelUsuario.setMinimumSize(new java.awt.Dimension(59, 60));
        PanelUsuario.setPreferredSize(new java.awt.Dimension(680, 513));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Usuario"));

        jLabel14.setText("Usuario");

        jLabel15.setText("Password");

        jLabel16.setText("Fecha Nacimiento");

        jLabel17.setText("Rut");

        jLabel18.setText("Sexo");

        jLabel19.setText("Nombre");

        jLabel20.setText("Apellido Paterno");

        jLabel21.setText("Apellido Materno");

        jLabel22.setText("Email");

        jLabel23.setText("Telefono");

        jLabel24.setText("Re-Password");

        buttonGroup1.add(rbUsuarioMasculino);
        rbUsuarioMasculino.setText("Masculino");

        buttonGroup1.add(rbUsuarioFemenino);
        rbUsuarioFemenino.setText("Femenino");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addContainerGap(485, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addContainerGap(467, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addComponent(jLabel15)
                            .addComponent(jLabel17)
                            .addComponent(jLabel19)
                            .addComponent(jLabel20)
                            .addComponent(jLabel18)
                            .addComponent(jLabel16))
                        .addGap(32, 32, 32)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(rbUsuarioMasculino)
                                .addGap(39, 39, 39)
                                .addComponent(rbUsuarioFemenino))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txtUsuarioTelefono, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtUsuarioEmail, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtUsuarioApPaterno)
                                    .addComponent(txtUsuarioNombre, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtUsuarioRut, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtUsuarioPassword)
                                    .addComponent(txtUsuarioUser, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel21)
                                    .addComponent(jLabel24))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtUsuarioPasswordC)
                                    .addComponent(txtUsuarioApMaterno, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)))
                            .addComponent(DateChooserFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(46, 46, 46))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(txtUsuarioUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(txtUsuarioPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUsuarioPasswordC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel16)
                    .addComponent(DateChooserFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(txtUsuarioRut, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(rbUsuarioMasculino)
                    .addComponent(rbUsuarioFemenino))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(txtUsuarioNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(txtUsuarioApPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21)
                    .addComponent(txtUsuarioApMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(txtUsuarioEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel23)
                    .addComponent(txtUsuarioTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(97, Short.MAX_VALUE))
        );

        btnIngresar.setText("Ingresar");
        btnIngresar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIngresarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout UsuarioIngresoLayout = new javax.swing.GroupLayout(UsuarioIngreso);
        UsuarioIngreso.setLayout(UsuarioIngresoLayout);
        UsuarioIngresoLayout.setHorizontalGroup(
            UsuarioIngresoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UsuarioIngresoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(130, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UsuarioIngresoLayout.createSequentialGroup()
                .addContainerGap(351, Short.MAX_VALUE)
                .addComponent(btnIngresar)
                .addGap(251, 251, 251))
        );
        UsuarioIngresoLayout.setVerticalGroup(
            UsuarioIngresoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UsuarioIngresoLayout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnIngresar)
                .addContainerGap(35, Short.MAX_VALUE))
        );

        PanelUsuario.addTab("Ingreso", UsuarioIngreso);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Usuario"));

        jLabel25.setText("Usuario");

        jLabel26.setText("Password");

        jLabel27.setText("Fecha Nacimiento");

        jLabel28.setText("Rut");

        jLabel29.setText("Sexo");

        jLabel30.setText("Nombre");

        jLabel31.setText("Apellido Paterno");

        jLabel32.setText("Apellido Materno");

        jLabel33.setText("Email");

        jLabel34.setText("Telefono");

        jLabel35.setText("Re-Password");

        buttonGroup2.add(rbUsuarioMasculinoM);
        rbUsuarioMasculinoM.setText("Masculino");

        buttonGroup2.add(rbUsuarioFemeninoM);
        rbUsuarioFemeninoM.setText("Femenino");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel33)
                        .addContainerGap(485, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel34)
                        .addContainerGap(467, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel25)
                            .addComponent(jLabel26)
                            .addComponent(jLabel28)
                            .addComponent(jLabel30)
                            .addComponent(jLabel31)
                            .addComponent(jLabel27)
                            .addComponent(jLabel29))
                        .addGap(32, 32, 32)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtUsuarioTelefonoM)
                                    .addComponent(txtUsuarioEmailM)
                                    .addComponent(txtUsuarioApPaternoM, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(txtUsuarioNombreM)
                                    .addComponent(txtUsuarioRutM)
                                    .addComponent(txtUsuarioPasswordM, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(txtUsuarioUserM, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel32)
                                    .addComponent(jLabel35))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtUsuarioPasswordCM)
                                    .addComponent(txtUsuarioApMaternoM, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(rbUsuarioMasculinoM)
                                .addGap(18, 18, 18)
                                .addComponent(rbUsuarioFemeninoM))
                            .addComponent(DateChooserFechaM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(46, 46, 46))))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(txtUsuarioUserM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(txtUsuarioPasswordM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUsuarioPasswordCM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel27)
                    .addComponent(DateChooserFechaM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(txtUsuarioRutM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(rbUsuarioMasculinoM)
                    .addComponent(rbUsuarioFemeninoM))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(txtUsuarioNombreM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(txtUsuarioApPaternoM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32)
                    .addComponent(txtUsuarioApMaternoM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(txtUsuarioEmailM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel34)
                    .addComponent(txtUsuarioTelefonoM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(49, Short.MAX_VALUE))
        );

        btnModificarUser.setText("Modificar");
        btnModificarUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnModificarUserActionPerformed(evt);
            }
        });

        btnEliminarUser.setText("Eliminar");
        btnEliminarUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarUserActionPerformed(evt);
            }
        });

        jLabel36.setText("ID");

        btnBuscarUser.setText("Buscar");
        btnBuscarUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarUserActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout UsuarioModificarLayout = new javax.swing.GroupLayout(UsuarioModificar);
        UsuarioModificar.setLayout(UsuarioModificarLayout);
        UsuarioModificarLayout.setHorizontalGroup(
            UsuarioModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UsuarioModificarLayout.createSequentialGroup()
                .addGroup(UsuarioModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(UsuarioModificarLayout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(UsuarioModificarLayout.createSequentialGroup()
                        .addGap(152, 152, 152)
                        .addComponent(btnModificarUser)
                        .addGap(18, 18, 18)
                        .addComponent(btnEliminarUser))
                    .addGroup(UsuarioModificarLayout.createSequentialGroup()
                        .addGap(170, 170, 170)
                        .addComponent(jLabel36)
                        .addGap(18, 18, 18)
                        .addComponent(txtUsuarioBuscarId, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnBuscarUser)))
                .addContainerGap(113, Short.MAX_VALUE))
        );
        UsuarioModificarLayout.setVerticalGroup(
            UsuarioModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UsuarioModificarLayout.createSequentialGroup()
                .addContainerGap(24, Short.MAX_VALUE)
                .addGroup(UsuarioModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtUsuarioBuscarId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscarUser))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(UsuarioModificarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnModificarUser)
                    .addComponent(btnEliminarUser))
                .addGap(49, 49, 49))
        );

        PanelUsuario.addTab("Modificar", UsuarioModificar);

        btnRefreshUser.setText("Refresh");
        btnRefreshUser.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshUserActionPerformed(evt);
            }
        });

        TablaUserListar.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Id", "User ", "Fecha Nacimiento", "Rut", "Sexo", "Nombre", "Ap Paterno", "Ap Materno", "Email", "Telefono "
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.Object.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(TablaUserListar);

        javax.swing.GroupLayout UsuarioListarLayout = new javax.swing.GroupLayout(UsuarioListar);
        UsuarioListar.setLayout(UsuarioListarLayout);
        UsuarioListarLayout.setHorizontalGroup(
            UsuarioListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(UsuarioListarLayout.createSequentialGroup()
                .addGroup(UsuarioListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(UsuarioListarLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE))
                    .addGroup(UsuarioListarLayout.createSequentialGroup()
                        .addGap(300, 300, 300)
                        .addComponent(btnRefreshUser)))
                .addContainerGap())
        );
        UsuarioListarLayout.setVerticalGroup(
            UsuarioListarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, UsuarioListarLayout.createSequentialGroup()
                .addContainerGap(29, Short.MAX_VALUE)
                .addComponent(btnRefreshUser)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 402, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        PanelUsuario.addTab("Listar", UsuarioListar);

        PanelVenta.setMinimumSize(new java.awt.Dimension(59, 60));
        PanelVenta.setPreferredSize(new java.awt.Dimension(680, 513));

        jLabel37.setText("Formas de Pago");

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jCheckBox1.setText("Nueva Forma de Pago");

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel39.setText("Usuario");

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel38.setText("Libro");

        jLabel40.setText("Costo del Libro");

        lblPrecio.setText("Costo");

        jLabel41.setText("Fecha de venta");

        jLabel42.setText("Hora de Venta");

        lblHoraVenta.setText("Hora");

        btnSetVenta.setText("Set Venta");
        btnSetVenta.setToolTipText("Ingresa la hora y la fecha en que se realiza la venta\n");
        btnSetVenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSetVentaActionPerformed(evt);
            }
        });

        btnIngresarVenta.setText("Ingresar Venta");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnSetVenta)
                    .addComponent(jLabel41)
                    .addComponent(jLabel40)
                    .addComponent(jCheckBox1)
                    .addComponent(jLabel37)
                    .addComponent(jLabel39)
                    .addComponent(jLabel38)
                    .addComponent(jLabel42))
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(61, 61, 61)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(lblHoraVenta, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap())
                            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel8Layout.createSequentialGroup()
                                    .addComponent(lblPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap())
                                .addGroup(jPanel8Layout.createSequentialGroup()
                                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)
                                        .addComponent(jComboBox2, 0, 173, Short.MAX_VALUE)
                                        .addComponent(jComboBox3, 0, 173, Short.MAX_VALUE)
                                        .addComponent(DateChooserVenta, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)
                                        .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(309, 309, 309)))))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(73, 73, 73)
                        .addComponent(btnIngresarVenta)
                        .addContainerGap())))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(99, 99, 99)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox1)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel39)
                    .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel40)
                    .addComponent(lblPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(41, 41, 41)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel41)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel42))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(DateChooserVenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(lblHoraVenta)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSetVenta)
                    .addComponent(btnIngresarVenta))
                .addGap(28, 28, 28))
        );

        PanelVenta.addTab(" Encabezado de Boleta", jPanel8);

        TablaVentaListar.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane3.setViewportView(TablaVentaListar);

        btnRefreshVenta.setText("Refresh");
        btnRefreshVenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRefreshVentaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 672, Short.MAX_VALUE)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 652, Short.MAX_VALUE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGap(300, 300, 300)
                        .addComponent(btnRefreshVenta)))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 485, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(31, Short.MAX_VALUE)
                .addComponent(btnRefreshVenta)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 402, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        PanelVenta.addTab("Historial", jPanel7);

        jMenu1.setText("Archivo");

        jMenuItem1.setText("Usuarios");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Libros");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuItem3.setText("Ventas");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem3);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(PanelLibro, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(PanelUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(PanelVenta, javax.swing.GroupLayout.PREFERRED_SIZE, 677, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(13, Short.MAX_VALUE)))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(PanelLibro, javax.swing.GroupLayout.PREFERRED_SIZE, 513, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(PanelUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 511, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(13, Short.MAX_VALUE)))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(PanelVenta, javax.swing.GroupLayout.DEFAULT_SIZE, 513, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        PanelLibro.getAccessibleContext().setAccessibleName("Ingreso");

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
private void txtLibroPrecioIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLibroPrecioIActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtLibroPrecioIActionPerformed

private void txtLibroPrecioMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLibroPrecioMActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtLibroPrecioMActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
// TODO add your handling code here:
    this.PanelLibro.setVisible(false);
    this.PanelUsuario.setVisible(true);
    this.PanelVenta.setVisible(false);
}//GEN-LAST:event_jMenuItem1ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
// TODO add your handling code here:
    this.PanelLibro.setVisible(true);
    this.PanelUsuario.setVisible(false);
    this.PanelVenta.setVisible(false);
}//GEN-LAST:event_jMenuItem2ActionPerformed

private void txtLibroAutorIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLibroAutorIActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtLibroAutorIActionPerformed

private void btnSubirImagenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubirImagenActionPerformed

//Valor que tomara el fileChooser
    JFileChooser ven = new JFileChooser();
//Añadiendole un filtro
    FileNameExtensionFilter filter = new FileNameExtensionFilter("JPG & PNG", "jpg", "png");
    ven.setFileFilter(filter);
    int result = ven.showOpenDialog(null);
       if ( result == JFileChooser.APPROVE_OPTION )
       {
            try 
            {
                //se asigna a "url" el archivo de imagen seleccionado
                URL url = ven.getSelectedFile().toURL();
                cargar_imagen_en_buffer(url);
                PanelImagen.removeAll();
                this.PanelImagen.add(new panelImagen(Obtener_imagen_de_Buffer(), PanelImagen.getSize()));
                PanelImagen.setVisible(true);
                PanelImagen.repaint();
                fip=null;
                fip= new FileInputStream(ven.getSelectedFile());
                     
             }
            catch (Exception ex) {
                System.out.println("problema --"+ex);
            }
       }
}//GEN-LAST:event_btnSubirImagenActionPerformed

    private void btnLibroAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLibroAgregarActionPerformed
        if(this.chkNuevoAutor.isSelected())
        {
            if(this.chkNuevoEditorial.isSelected())
            {                
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                
                au.setNombre(l.insertarAutor(this.txtLibroAutorI.getText().trim()));
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(l.insertarEditorial(this.txtLibroEditorialI.getText().trim()));
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setNOMBRE_ARTICULO(this.txtLibroNombreI.getText().trim());
                li.setAUTOR(au.getNombre().trim());
                li.setEDITORIAL(ed.getNombre().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoI.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaI.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioI.getText().trim()));
                
                
                l.insertarLibro(li, ed, au,fip);
                this.camposLimpios();
            }
            else
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                
                au.setNombre(l.insertarAutor(this.txtLibroAutorI.getText().trim()));
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(this.cmbLibroEditorialI.getSelectedItem().toString().trim());
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                                
                li.setNOMBRE_ARTICULO(this.txtLibroNombreI.getText().trim());
                li.setAUTOR(au.getNombre().trim());
                li.setEDITORIAL(this.cmbLibroEditorialI.getSelectedItem().toString().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoI.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaI.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioI.getText().trim()));
                
                l.insertarLibro(li, ed, au,fip);
                this.camposLimpios();
                
            }
        }
        else
        {
            if(this.chkNuevoEditorial.isSelected())
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                               
                au.setNombre(this.txtLibroAutorI.getText().trim());
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(l.insertarEditorial(this.txtLibroEditorialI.getText().trim()));
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setNOMBRE_ARTICULO(this.txtLibroNombreI.getText().trim());
                li.setAUTOR(this.cmbLibroAutorI.getSelectedItem().toString().trim());
                li.setEDITORIAL(ed.getNombre().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoI.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaI.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioI.getText().trim()));
                
                l.insertarLibro(li, ed, au,fip);
                this.camposLimpios();
            }
            else
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
        
                li.setNOMBRE_ARTICULO(this.txtLibroNombreI.getText().trim());
                li.setAUTOR(this.cmbLibroAutorI.getSelectedItem().toString().trim());
                li.setEDITORIAL(this.cmbLibroEditorialI.getSelectedItem().toString().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoI.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaI.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioI.getText().trim()));
                
                au.setId(l.obtenerIdAutor(li.getAUTOR().trim()));
                au.setNombre(li.getAUTOR().trim());
                
                ed.setNombre(this.cmbLibroEditorialI.getSelectedItem().toString().trim());
                ed.setId(l.obtenerIdEditorial(li.getEDITORIAL().trim()));
                
                l.insertarLibro(li, ed, au,fip);
                this.camposLimpios();
            }
            this.listarLibros();
        }    
    }//GEN-LAST:event_btnLibroAgregarActionPerformed

private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
// TODO add your handling code here:
    Libro lib =new Libro();

    int id = Integer.parseInt(this.txbIdBuscar.getText().trim());
    lib= l.buscarLibro(id);
    if(!lib.getNOMBRE_ARTICULO().equals(""))
    {
        this.txtAnoM.setText(String.valueOf(lib.getAGNO()));
        this.txtLibroNombreM.setText(lib.getNOMBRE_ARTICULO());
        this.txtLibroPaginaM.setText(String.valueOf(lib.getNUM_PAGINAS()));
        this.txtLibroPrecioM.setText(String.valueOf(lib.getMONTO_ARTICULO()));
        this.cmbLibroAutorM.setSelectedItem(lib.getAUTOR());
        this.cmbLibroEditorialM.setSelectedItem(lib.getEDITORIAL());
    }
}//GEN-LAST:event_btnBuscarActionPerformed

private void btnModificarImagenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarImagenActionPerformed

    JFileChooser ven = new JFileChooser();
//Añadiendole un filtro
    FileNameExtensionFilter filter = new FileNameExtensionFilter("JPG & PNG", "jpg", "png");
    ven.setFileFilter(filter);
    int result = ven.showOpenDialog(null);
    if ( result == JFileChooser.APPROVE_OPTION )
       {
            try 
            {
                //se asigna a "url" el archivo de imagen seleccionado
                URL url = ven.getSelectedFile().toURL();
                cargar_imagen_en_buffer(url);
                this.panelImagenM.removeAll();
                this.panelImagenM.add(new panelImagen(Obtener_imagen_de_Buffer(), panelImagenM.getSize()));
                panelImagenM.setVisible(true);
                panelImagenM.repaint();
                fipMod=null;
                fipMod= new FileInputStream(ven.getSelectedFile());
                     
             }
            catch (Exception ex) {
                System.out.println("problema --"+ex);
            }
       }
}//GEN-LAST:event_btnModificarImagenActionPerformed

    private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        int id = Integer.parseInt(this.txbIdBuscar.getText().trim());
        
        l.ElimiarLibro(id);
        JOptionPane.showMessageDialog(this, "Libro Eliminado");
        
        this.listarLibros();
    }//GEN-LAST:event_btnEliminarActionPerformed

private void btnModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarActionPerformed
    if(this.chkNuevoAutorM.isSelected())
        {
            if(this.chkNuevoEditorialM.isSelected())
            {               
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                
                au.setNombre(l.insertarAutor(this.txtLibroAutorM.getText().trim()));
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(l.insertarEditorial(this.txtLibroEditorialM.getText().trim()));
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setID_Libro(Integer.parseInt(this.txbIdBuscar.getText().trim()));
                li.setNOMBRE_ARTICULO(this.txtLibroNombreM.getText().trim());
                li.setAUTOR(au.getNombre().trim());
                li.setEDITORIAL(ed.getNombre().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoM.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaM.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioM.getText().trim()));
                
                
                l.ModificarLibro(li, ed, au,fipMod);
                this.camposLimpiosM();
            }
            else
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                
                au.setNombre(l.insertarAutor(this.txtLibroAutorM.getText().trim()));
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(this.cmbLibroEditorialM.getSelectedItem().toString().trim());
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setID_Libro(Integer.parseInt(this.txbIdBuscar.getText().trim()));
                li.setNOMBRE_ARTICULO(this.txtLibroNombreM.getText().trim());
                li.setAUTOR(au.getNombre().trim());
                li.setEDITORIAL(this.cmbLibroEditorialM.getSelectedItem().toString().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoM.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaM.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioM.getText().trim()));
                
                l.ModificarLibro(li, ed, au,fipMod);
                this.camposLimpiosM();
                
            }
        }
        else
        {
            if(this.chkNuevoEditorialM.isSelected())
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                               
                au.setNombre(this.cmbLibroAutorM.getSelectedItem().toString().trim());
                au.setId(l.obtenerIdAutor(au.getNombre().trim()));
                
                ed.setNombre(l.insertarEditorial(this.txtLibroEditorialM.getText().trim()));
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setID_Libro(Integer.parseInt(this.txbIdBuscar.getText().trim()));
                li.setNOMBRE_ARTICULO(this.txtLibroNombreM.getText().trim());
                li.setAUTOR(this.cmbLibroAutorM.getSelectedItem().toString().trim());
                li.setEDITORIAL(ed.getNombre().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoM.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaM.getText().trim()));
                li.setMONTO_ARTICULO(Integer.parseInt(this.txtLibroPrecioM.getText().trim()));
                
                l.ModificarLibro(li, ed, au,fipMod);
                this.camposLimpiosM();
            }
            else
            {
                Libro li = new Libro();
                modelo.Autor au = new modelo.Autor();
                Editorial ed = new Editorial();
                
                ed.setNombre(this.cmbLibroEditorialM.getSelectedItem().toString().trim());
                ed.setId(l.obtenerIdEditorial(li.getEDITORIAL().trim()));
                
                ed.setNombre(this.cmbLibroEditorialM.getSelectedItem().toString().trim());
                ed.setId(l.obtenerIdEditorial(ed.getNombre().trim()));
                
                li.setID_Libro(Integer.parseInt(this.txbIdBuscar.getText().trim()));
                li.setNOMBRE_ARTICULO(this.txtLibroNombreM.getText().trim());
                li.setAUTOR(this.cmbLibroAutorM.getSelectedItem().toString().trim());
                li.setEDITORIAL(this.cmbLibroEditorialM.getSelectedItem().toString().trim());
                li.setAGNO(Integer.parseInt(this.txtAnoM.getText().trim()));
                li.setNUM_PAGINAS(Integer.parseInt(this.txtLibroPaginaM.getText().trim()));
                li.setMONTO_ARTICULO(Double.parseDouble(this.txtLibroPrecioM.getText().trim()));
                   
                l.ModificarLibro(li, ed, au,fipMod);
                this.camposLimpiosM();
            }
        }
}//GEN-LAST:event_btnModificarActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
this.listarLibros();
}//GEN-LAST:event_jButton1ActionPerformed

private void btnBuscarUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarUserActionPerformed
// TODO add your handling code here:
    Usuario us=u.BuscarUsuario(Integer.parseInt(this.txtUsuarioBuscarId.getText().trim()));

    this.txtUsuarioUserM.setText(us.getNombre_usuario().trim());
    this.txtUsuarioApMaternoM.setText(us.getApMaterno().trim());
    this.txtUsuarioApPaternoM.setText(us.getApPaterno().trim());
    this.txtUsuarioEmailM.setText(us.getEmail().trim());
    this.txtUsuarioNombreM.setText(us.getNombre().trim());
    this.txtUsuarioPasswordM.setText(us.getPassword().trim());
    this.txtUsuarioPasswordCM.setText(us.getPassword().trim());
    this.txtUsuarioRutM.setText(us.getRut());
    this.txtUsuarioTelefonoM.setText(us.getTelefono().trim());
    if(us.getSexo().equals("Masculino"))
    {
        this.rbUsuarioMasculinoM.setSelected(true);
    }
    else
    {
        this.rbUsuarioFemeninoM.setSelected(true);
    }
    this.DateChooserFechaM.setDate(us.getFecha_nac());
}//GEN-LAST:event_btnBuscarUserActionPerformed

private void btnRefreshUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshUserActionPerformed
// TODO add your handling code here:
    this.listarUsuarios();
}//GEN-LAST:event_btnRefreshUserActionPerformed

private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIngresarActionPerformed
// TODO add your handling code here:
    String pass1=this.txtUsuarioPassword.getText().trim();
    String pass2=this.txtUsuarioPasswordC.getText().trim();
            
    if(pass1.equals(pass2))
    {
        Usuario us= new Usuario();
        us.setNombre_usuario(this.txtUsuarioUser.getText().trim());
        us.setPassword(this.txtUsuarioPassword.getText().trim());
        //us.setFecha_nac( );
        us.setFecha_nac(new java.sql.Date(this.DateChooserFecha.getDate().getTime()));
        us.setRut(this.txtUsuarioRut.getText());
        if(this.rbUsuarioMasculino.isSelected())
            us.setSexo("Mas");
        else
            us.setSexo("Fem");
        us.setNombre(this.txtUsuarioNombre.getText().trim());
        us.setApPaterno(this.txtUsuarioApPaterno.getText().trim());
        us.setApMaterno(this.txtUsuarioApMaterno.getText().trim());
        us.setEmail(this.txtUsuarioEmail.getText().trim());
        us.setTelefono(this.txtUsuarioTelefono.getText().trim());
        
        u.ingresarUsuario(us);
    }
    else
        JOptionPane.showMessageDialog(this, "Las password no coinciden");
    this.usuarioCamposLimpios();
    //this.listarUsuarios();
}//GEN-LAST:event_btnIngresarActionPerformed

private void btnModificarUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarUserActionPerformed
// TODO add your handling code here:
    String pass1=this.txtUsuarioPasswordM.getText().trim();
    String pass2=this.txtUsuarioPasswordCM.getText().trim();
            
    if(pass1.equals(pass2))
    {
        Usuario us= new Usuario();
        us.setId_usuario(Integer.parseInt(this.txtUsuarioBuscarId.getText().trim()));
        us.setNombre_usuario(this.txtUsuarioUserM.getText().trim());
        us.setPassword(this.txtUsuarioPasswordM.getText().trim());
        //us.setFecha_nac( );
        us.setFecha_nac(new java.sql.Date(this.DateChooserFechaM.getDate().getTime()));
        us.setRut(this.txtUsuarioRutM.getText());
        if(this.rbUsuarioMasculinoM.isSelected())
            us.setSexo("Mas");
        else
            us.setSexo("Fem");
        us.setNombre(this.txtUsuarioNombreM.getText().trim());
        us.setApPaterno(this.txtUsuarioApPaternoM.getText().trim());
        us.setApMaterno(this.txtUsuarioApMaternoM.getText().trim());
        us.setEmail(this.txtUsuarioEmailM.getText().trim());
        us.setTelefono(this.txtUsuarioTelefonoM.getText().trim());
        
        u.ModificarUsuario(us);
        this.listarUsuarios();
        this.camposLimpiosM();
    }
}//GEN-LAST:event_btnModificarUserActionPerformed

private void btnEliminarUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarUserActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnEliminarUserActionPerformed

private void btnRefreshVentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshVentaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_btnRefreshVentaActionPerformed

private void btnSetVentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSetVentaActionPerformed
// TODO add your handling code here:
    fechaV=null;
    java.util.Date utilDate = new java.util.Date();
    fechaV = new java.sql.Date(utilDate.getTime());
    this.DateChooserVenta.setDate(utilDate);
    String hora=String.valueOf(utilDate.getHours());
    String minuto=String.valueOf(utilDate.getMinutes());
    this.lblHoraVenta.setText(hora+":"+minuto);
    
}//GEN-LAST:event_btnSetVentaActionPerformed

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
// TODO add your handling code here:
    this.PanelLibro.setVisible(false);
    this.PanelUsuario.setVisible(false);
    this.PanelVenta.setVisible(true);
}//GEN-LAST:event_jMenuItem3ActionPerformed

    /**
     * @param args the command line arguments
     */
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.toedter.calendar.JDateChooser DateChooserFecha;
    private com.toedter.calendar.JDateChooser DateChooserFechaM;
    private com.toedter.calendar.JDateChooser DateChooserVenta;
    private javax.swing.JPanel LibroIngreso;
    private javax.swing.JPanel LibroListar;
    private javax.swing.JPanel LibroModificar;
    private javax.swing.JPanel PanelImagen;
    private javax.swing.JTabbedPane PanelLibro;
    private javax.swing.JTabbedPane PanelUsuario;
    private javax.swing.JTabbedPane PanelVenta;
    private javax.swing.JTable TablaLibroListar;
    private javax.swing.JTable TablaUserListar;
    private javax.swing.JTable TablaVentaListar;
    private javax.swing.JPanel UsuarioIngreso;
    private javax.swing.JPanel UsuarioListar;
    private javax.swing.JPanel UsuarioModificar;
    private java.util.List<gui.Autor> autorList;
    private javax.persistence.Query autorQuery;
    private javax.swing.JButton btnAgregarGenero;
    private javax.swing.JButton btnAgregarIdioma;
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnBuscarUser;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnEliminarUser;
    private javax.swing.JButton btnIngresar;
    private javax.swing.JButton btnIngresarVenta;
    private javax.swing.JButton btnLibroAgregar;
    private javax.swing.JButton btnModificar;
    private javax.swing.JButton btnModificarImagen;
    private javax.swing.JButton btnModificarUser;
    private javax.swing.JButton btnRefreshUser;
    private javax.swing.JButton btnRefreshVenta;
    private javax.swing.JButton btnSetVenta;
    private javax.swing.JButton btnSubirImagen;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JCheckBox chkNuevoAutor;
    private javax.swing.JCheckBox chkNuevoAutorM;
    private javax.swing.JCheckBox chkNuevoEditorial;
    private javax.swing.JCheckBox chkNuevoEditorialM;
    private javax.swing.JComboBox cmbLibroAutorI;
    private javax.swing.JComboBox cmbLibroAutorM;
    private javax.swing.JComboBox cmbLibroEditorialI;
    private javax.swing.JComboBox cmbLibroEditorialM;
    private javax.persistence.EntityManager entityManager;
    private javax.swing.JButton jButton1;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JLabel lblHoraVenta;
    private javax.swing.JLabel lblPrecio;
    private javax.swing.JPanel panelImagenM;
    private javax.swing.JRadioButton rbUsuarioFemenino;
    private javax.swing.JRadioButton rbUsuarioFemeninoM;
    private javax.swing.JRadioButton rbUsuarioMasculino;
    private javax.swing.JRadioButton rbUsuarioMasculinoM;
    private javax.swing.JTextField txbIdBuscar;
    private javax.swing.JTextField txtAnoI;
    private javax.swing.JTextField txtAnoM;
    private javax.swing.JTextField txtGenero;
    private javax.swing.JTextField txtIdioma;
    private javax.swing.JTextField txtLibroAutorI;
    private javax.swing.JTextField txtLibroAutorM;
    private javax.swing.JTextField txtLibroEditorialI;
    private javax.swing.JTextField txtLibroEditorialM;
    private javax.swing.JTextField txtLibroNombreI;
    private javax.swing.JTextField txtLibroNombreM;
    private javax.swing.JTextField txtLibroPaginaI;
    private javax.swing.JTextField txtLibroPaginaM;
    private javax.swing.JTextField txtLibroPrecioI;
    private javax.swing.JTextField txtLibroPrecioM;
    private javax.swing.JTextField txtUsuarioApMaterno;
    private javax.swing.JTextField txtUsuarioApMaternoM;
    private javax.swing.JTextField txtUsuarioApPaterno;
    private javax.swing.JTextField txtUsuarioApPaternoM;
    private javax.swing.JTextField txtUsuarioBuscarId;
    private javax.swing.JTextField txtUsuarioEmail;
    private javax.swing.JTextField txtUsuarioEmailM;
    private javax.swing.JTextField txtUsuarioNombre;
    private javax.swing.JTextField txtUsuarioNombreM;
    private javax.swing.JTextField txtUsuarioPassword;
    private javax.swing.JTextField txtUsuarioPasswordC;
    private javax.swing.JTextField txtUsuarioPasswordCM;
    private javax.swing.JTextField txtUsuarioPasswordM;
    private javax.swing.JTextField txtUsuarioRut;
    private javax.swing.JTextField txtUsuarioRutM;
    private javax.swing.JTextField txtUsuarioTelefono;
    private javax.swing.JTextField txtUsuarioTelefonoM;
    private javax.swing.JTextField txtUsuarioUser;
    private javax.swing.JTextField txtUsuarioUserM;
    // End of variables declaration//GEN-END:variables
}
